#ifndef INPUT_H
#define INPUT_H

#include <Windows.h>
#include <dinput.h>

#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")

class Input {
public:
	Input();
	~Input();

	int Initialize(HINSTANCE& hInstance);
	void HandleInput(/*UINT param*/);
	void UpdateCursorPos();
	int Shutdown();

	struct Keys {
		bool left, right, up, down, del, escape, pageup, pagedown, num2, num4, num6, num8, numplus, numminus, endkey, F12;
	};

	struct ToggleKeys {
		bool escape, F12;
	};

	int mouseX, mouseY;
	Keys KeysPressed;
	ToggleKeys ToggledKeys;
	int pageCount;

private:
	
	enum InputState {
		Write,
		Play,
		Blocked
	};

	InputState inputState;

	IDirectInput8* directInput;
	IDirectInputDevice8* keyboard;
	IDirectInputDevice8* mouse;

	unsigned char keyboardState[256];
	DIMOUSESTATE mouseState;

};

#endif